﻿namespace Sidvall.IdentityManager.Data.IO.Entities
{
    public partial class AspNetUserClaims : global::Sidvall.Data.ServiceDataRowBase, global::Sidvall.IdentityManager.Data.IAspNetUserClaims
    {
        #region Public Members

        #region ClaimType

        private string _ClaimType;
        public string ClaimType
        { 
            get
            {
                return _ClaimType;
            }
            set
            {
                _ClaimType = value;
            }
        }

        #endregion
        #region ClaimValue

        private string _ClaimValue;
        public string ClaimValue
        { 
            get
            {
                return _ClaimValue;
            }
            set
            {
                _ClaimValue = value;
            }
        }

        #endregion
        #region Id

        private System.Nullable<int> _Id;
        public System.Nullable<int> Id
        { 
            get
            {
                return _Id;
            }
            set
            {
                _Id = value;
            }
        }

        #endregion
        #region UserId

        private string _UserId;
        public string UserId
        { 
            get
            {
                return _UserId;
            }
            set
            {
                _UserId = value;
            }
        }

        #endregion
        
        public AspNetUsers AspNetUser { get; set; }
        
        #region DataRowContextStorageKey

        protected override string DataRowContextStorageKey
        {
            get
            {
                return global::Sidvall.IdentityManager.Data.IO.SystemContext.Current.EntityFacade.AspNetUserClaimsManager.GetKey(this);
            }
        }

        #endregion
        #region DataRowStateIsDirty

        protected override bool DataRowStateIsDirty
        {
            get
            {
                return global::Sidvall.IdentityManager.Data.IO.SystemContext.Current.EntityFacade.AspNetUserClaimsManager.DataRowStateIsDirty(this);
            }
        }

        #endregion

        #region IAspNetUserClaims Members

        string global::Sidvall.IdentityManager.Data.IAspNetUserClaims.ClaimType
        {
            get
            {
                return _ClaimType;
            }
            set
            {
                _ClaimType = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUserClaims.ClaimValue
        {
            get
            {
                return _ClaimValue;
            }
            set
            {
                _ClaimValue = value;
            }
        }
        System.Nullable<int> global::Sidvall.IdentityManager.Data.IAspNetUserClaims.Id
        {
            get
            {
                return _Id;
            }
            set
            {
                _Id = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUserClaims.UserId
        {
            get
            {
                return _UserId;
            }
            set
            {
                _UserId = value;
            }
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
        global::Sidvall.IdentityManager.Data.IAspNetUsers global::Sidvall.IdentityManager.Data.IAspNetUserClaims.AspNetUser
        {
            get
            {
                return this.AspNetUser;
            }
            set
            {
                this.AspNetUser = value as AspNetUsers;
            }
        }

        #endregion

        #endregion
        #region Constructors

        public AspNetUserClaims() : this(false, null, null)
        {
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public AspNetUserClaims(bool initializeChildren, Sidvall.Data.IDataRowContextProvider context, Sidvall.Data.DataRowState? dataRowState)
        {
            if ((context != null) || (dataRowState != null))
                SetDataRowContext(context, dataRowState);
            if (initializeChildren)
            {
            }
        }

        #endregion
    }
}